package com.blockchain.front.service.financial;

import java.math.BigDecimal;

import com.blockchain.common.enums.ChargeStatus;
import com.blockchain.common.enums.ChargeType;
import com.blockchain.common.enums.EntrustType;
import com.blockchain.common.enums.JyztStatus;
import com.blockchain.common.enums.WithdrawStatus;
import com.blockchain.framework.service.Service;
import com.blockchain.framework.service.query.Paging;
import com.blockchain.framework.service.query.PagingResult;
import com.blockchain.front.service.financial.entity.JlEntity;
import com.blockchain.front.service.financial.entity.RechargeQrEntity;
import com.blockchain.front.service.financial.entity.TxRecordEntity;
import com.blockchain.front.service.financial.entity.UserZhEntity;
import com.blockchain.front.service.financial.entity.XlbEntity;

/**
 * 财务中心
 * 
 */
public abstract interface FinancialManage extends Service {

	/**
	 * 描述：查询用户账户信息（人民币）
	 * 
	 */
	public abstract UserZhEntity getCny() throws Throwable;

	/**
	 * 描述：查询用户账户信息（虚拟币）
	 * 
	 */
	public abstract UserZhEntity[] getZhXlb() throws Throwable;

	/**
	 * 描述：查询成交记录
	 * 
	 */
	public abstract PagingResult<JlEntity> searchCjjl(int scid, JyztStatus s, Paging paging) throws Throwable;

	/**
	 * 描述：查询委托记录
	 * 
	 */
	public abstract PagingResult<JlEntity> searchWtjl(int scid, JyztStatus t, EntrustType s, Paging paging)
			throws Throwable;

	/**
	 * 描述：撤销委托
	 * 
	 */
	public abstract void cxWt(int id, int... scid) throws Throwable;

	/**
	 * 撤销订单
	 * 
	 * @param id&nbsp;&nbsp;挂单ID
	 * @throws Throwable
	 */
	public abstract void cancelOrder(int id, String apikey) throws Throwable;

	/**
	 * 描述：币转出记录
	 * 
	 */
	public abstract PagingResult<XlbEntity> searchXlbZc(int bid, Paging paging) throws Throwable;

	/**
	 * 描述：增加币转出记录
	 * 
	 */
	public abstract void addXlbZc(int bid, BigDecimal sl, String jymm, int qbid) throws Throwable;

	/**
	 * 描述：增加币转出记录
	 * 
	 */
	public abstract XlbEntity getXlbXx(int bid) throws Throwable;

	/**
	 * 描述：查询可用虚拟币
	 * 
	 */
	public abstract BigDecimal getKyXlb(int bid) throws Throwable;

	/**
	 * 描述：提现记录
	 * 
	 */
	public abstract PagingResult<TxRecordEntity> searchTxjl(int dzid, WithdrawStatus zt, Paging paging)
			throws Throwable;

	/**
	 * 描述：增加提现记录
	 * 
	 */
	public abstract void withdraw(BigDecimal txje, String txmm, int dzid,BigDecimal rate) throws Throwable;

	/**
	 * 描述：充值记录
	 * 
	 */
	public abstract PagingResult<TxRecordEntity> searchCzjl(ChargeType type, ChargeStatus zt, Paging paging)
			throws Throwable;

	/**
	 * 描述：增加充值信息
	 * 
	 */
	public abstract int addCz(ChargeType type, String name, String zh, BigDecimal czje, BigDecimal usdRate) throws Throwable;

	/**
	 * 描述：查询用户可用币
	 * 
	 */
	public abstract BigDecimal getB(int bid) throws Throwable;
	
	/**
	 * 描述：查询用户冻结币
	 * 
	 */
	public abstract BigDecimal getBd(int bid) throws Throwable;

	/**
	 * 描述：查询币中文名
	 * 
	 */
	public abstract String getZwm(int bid) throws Throwable;

	/**
	 * 描述：币转入记录
	 * 
	 */
	public abstract PagingResult<XlbEntity> searchXlbZr(int bid, Paging paging) throws Throwable;


	/**
	 * 描述：获取币ID
	 * 
	 */
	public int getbid() throws Throwable;

	/**
	 * 描述：获取可轉入币的ID
	 * 
	 */
	public int getzrbid() throws Throwable;

	/**
	 * 描述：获取可轉出币的ID
	 * 
	 */
	public int getzcbid() throws Throwable;
			
	
	/**
	 * 添加充值订单
	 * 
	 * @param amount
	 *            充值金额
	 * @param payType
	 *            支付方式，华融
	 * @return
	 * 2017年8月7日15:35:43
	 * @throws Throwable
	 */
	public abstract int addOrder(BigDecimal amount, String payType, String banknumber, BigDecimal usdRate)
			throws Throwable;


	/**
	 * 描述：查询用户单笔转币最高金额
	 * 2017年8月9日17:37:11
	 * 
	 */
	public abstract int getZbDbzg() throws Throwable;
	
	/**
	 * @return 折合成rmb 总资产
	 * @throws Throwable
	 */
	public abstract BigDecimal getAllZc() throws Throwable;

	/**
	 * @return 充值二維碼
	 * @throws Throwable
	 */
	public abstract RechargeQrEntity searchRechargeQr() throws Throwable;
}
